package com.three.storemanage.controller;

import com.three.core.entity.FrontUser;
import com.three.core.entity.Store;
import com.three.core.vo.R;
import com.three.storemanage.service.FrontUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @FileName: FrontUserController
 * @Description:
 * @Author: GYX
 * @CreateTime: 2025/3/17 16:10
 * @Version: 1.0.0
 */
@RestController
@RequestMapping("/store/frontuser")
public class FrontUserController {
    @Autowired
    private FrontUserService frontUserService;

    @GetMapping("/selectFrontUser")
    public R<Store> selectFrontUser(@RequestParam Integer storeId, @RequestParam Integer userId){
        return frontUserService.selectStoreByCondition(storeId,userId);
    }

    @PostMapping("/insertFrontUser")
    public R<Integer> insertFrontUser(@RequestBody FrontUser frontUser){
        return frontUserService.insertUser(frontUser);
    }

}
